package com.kabuda.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kabuda.domain.Article;
import com.kabuda.domain.vo.ArticleSearchVo;
import com.kabuda.domain.vo.ArticleVo;
import com.kabuda.mapper.ArticleMapper;
import com.kabuda.service.ArticleService;
import com.kabuda.service.CategoryService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author kabuda
* @description 针对表【article】的数据库操作Service实现
* @createDate 2023-10-15 16:02:16
*/
@Service
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article>
    implements ArticleService{

    @Autowired
    private CategoryService categoryService;

    @Override
    public List<ArticleVo> listVo(ArticleSearchVo searchVo) {
        Page<ArticleVo> page = new Page<>(searchVo.getPageNum(), searchVo.getPageSize());
        List<ArticleVo> list=this.baseMapper.listVo(page,searchVo);
        return list;
    }
}




